package com.jishaokang.controller;

import com.jishaokang.base.Result;
import com.jishaokang.model.dto.Const;
import com.jishaokang.model.dto.User;
import com.jishaokang.service.ConstService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.security.NoSuchAlgorithmException;

/**
 * Created by NANA_Final on 2019/6/21.
 */
@RestController
@RequestMapping(value = "/api")
public class ConstController {

    @Autowired
    private ConstService constService;

    @RequestMapping(value = "/examiner/const/selectMaskWord",method = RequestMethod.POST)
    public Result selectMaskWord(){
        return constService.selectMaskWord();
    }

    @RequestMapping(value = "/examiner/const/updateMaskWord",method = RequestMethod.POST)
    public Result updateMaskWord(@RequestBody Const maskWordConst){
        return constService.updateMaskWord(maskWordConst);
    }

    @RequestMapping(value = "/admin/const/selectLabel",method = RequestMethod.POST)
    public Result selectLabel(){
        return constService.selectLabel();
    }

    @RequestMapping(value = "/admin/const/updateLabel",method = RequestMethod.POST)
    public Result adminUpdateLabel(@RequestBody String label ){
        return constService.updateLabel(label);
    }

}